github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cloudfront/responseHeadersPolicy.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 cloudfront 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides a CloudFront response headers policy resource. 15 // A response headers policy contains information about a set of HTTP response headers and their values. 16 // After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. 17 // When it’s attached to a cache behavior, CloudFront adds the headers in the policy to every response that it sends for requests that match the cache behavior. 18 // 19 // ## Example Usage 20 // 21 // The example below creates a CloudFront response headers policy. 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront" 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 := cloudfront.NewResponseHeadersPolicy(ctx, "example", &cloudfront.ResponseHeadersPolicyArgs{ 37 // Name: pulumi.String("example-policy"), 38 // Comment: pulumi.String("test comment"), 39 // CorsConfig: &cloudfront.ResponseHeadersPolicyCorsConfigArgs{ 40 // AccessControlAllowCredentials: pulumi.Bool(true), 41 // AccessControlAllowHeaders: &cloudfront.ResponseHeadersPolicyCorsConfigAccessControlAllowHeadersArgs{ 42 // Items: pulumi.StringArray{ 43 // pulumi.String("test"), 44 // }, 45 // }, 46 // AccessControlAllowMethods: &cloudfront.ResponseHeadersPolicyCorsConfigAccessControlAllowMethodsArgs{ 47 // Items: pulumi.StringArray{ 48 // pulumi.String("GET"), 49 // }, 50 // }, 51 // AccessControlAllowOrigins: &cloudfront.ResponseHeadersPolicyCorsConfigAccessControlAllowOriginsArgs{ 52 // Items: pulumi.StringArray{ 53 // pulumi.String("test.example.comtest"), 54 // }, 55 // }, 56 // OriginOverride: pulumi.Bool(true), 57 // }, 58 // }) 59 // if err != nil { 60 // return err 61 // } 62 // return nil 63 // }) 64 // } 65 // 66 // ``` 67 // <!--End PulumiCodeChooser --> 68 // 69 // The example below creates a CloudFront response headers policy with a custom headers config. 70 // 71 // <!--Start PulumiCodeChooser --> 72 // ```go 73 // package main 74 // 75 // import ( 76 // 77 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront" 78 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 79 // 80 // ) 81 // 82 // func main() { 83 // pulumi.Run(func(ctx *pulumi.Context) error { 84 // _, err := cloudfront.NewResponseHeadersPolicy(ctx, "example", &cloudfront.ResponseHeadersPolicyArgs{ 85 // Name: pulumi.String("example-headers-policy"), 86 // CustomHeadersConfig: &cloudfront.ResponseHeadersPolicyCustomHeadersConfigArgs{ 87 // Items: cloudfront.ResponseHeadersPolicyCustomHeadersConfigItemArray{ 88 // &cloudfront.ResponseHeadersPolicyCustomHeadersConfigItemArgs{ 89 // Header: pulumi.String("X-Permitted-Cross-Domain-Policies"), 90 // Override: pulumi.Bool(true), 91 // Value: pulumi.String("none"), 92 // }, 93 // &cloudfront.ResponseHeadersPolicyCustomHeadersConfigItemArgs{ 94 // Header: pulumi.String("X-Test"), 95 // Override: pulumi.Bool(true), 96 // Value: pulumi.String("none"), 97 // }, 98 // }, 99 // }, 100 // }) 101 // if err != nil { 102 // return err 103 // } 104 // return nil 105 // }) 106 // } 107 // 108 // ``` 109 // <!--End PulumiCodeChooser --> 110 // 111 // The example below creates a CloudFront response headers policy with a custom headers config and server timing headers config. 112 // 113 // <!--Start PulumiCodeChooser --> 114 // ```go 115 // package main 116 // 117 // import ( 118 // 119 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront" 120 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 121 // 122 // ) 123 // 124 // func main() { 125 // pulumi.Run(func(ctx *pulumi.Context) error { 126 // _, err := cloudfront.NewResponseHeadersPolicy(ctx, "example", &cloudfront.ResponseHeadersPolicyArgs{ 127 // Name: pulumi.String("example-headers-policy"), 128 // CustomHeadersConfig: &cloudfront.ResponseHeadersPolicyCustomHeadersConfigArgs{ 129 // Items: cloudfront.ResponseHeadersPolicyCustomHeadersConfigItemArray{ 130 // &cloudfront.ResponseHeadersPolicyCustomHeadersConfigItemArgs{ 131 // Header: pulumi.String("X-Permitted-Cross-Domain-Policies"), 132 // Override: pulumi.Bool(true), 133 // Value: pulumi.String("none"), 134 // }, 135 // }, 136 // }, 137 // ServerTimingHeadersConfig: &cloudfront.ResponseHeadersPolicyServerTimingHeadersConfigArgs{ 138 // Enabled: pulumi.Bool(true), 139 // SamplingRate: pulumi.Float64(50), 140 // }, 141 // }) 142 // if err != nil { 143 // return err 144 // } 145 // return nil 146 // }) 147 // } 148 // 149 // ``` 150 // <!--End PulumiCodeChooser --> 151 // 152 // ## Import 153 // 154 // Using `pulumi import`, import Cloudfront Response Headers Policies using the `id`. For example: 155 // 156 // ```sh 157 // $ pulumi import aws:cloudfront/responseHeadersPolicy:ResponseHeadersPolicy policy 658327ea-f89d-4fab-a63d-7e88639e58f9 158 // ``` 159 type ResponseHeadersPolicy struct { 160 pulumi.CustomResourceState 161 162 // A comment to describe the response headers policy. The comment cannot be longer than 128 characters. 163 Comment pulumi.StringPtrOutput `pulumi:"comment"` 164 // A configuration for a set of HTTP response headers that are used for Cross-Origin Resource Sharing (CORS). See Cors Config for more information. 165 CorsConfig ResponseHeadersPolicyCorsConfigPtrOutput `pulumi:"corsConfig"` 166 // Object that contains an attribute `items` that contains a list of custom headers. See Custom Header for more information. 167 CustomHeadersConfig ResponseHeadersPolicyCustomHeadersConfigPtrOutput `pulumi:"customHeadersConfig"` 168 // The current version of the response headers policy. 169 Etag pulumi.StringOutput `pulumi:"etag"` 170 // A unique name to identify the response headers policy. 171 Name pulumi.StringOutput `pulumi:"name"` 172 // A configuration for a set of HTTP headers to remove from the HTTP response. Object that contains an attribute `items` that contains a list of headers. See Remove Header for more information. 173 RemoveHeadersConfig ResponseHeadersPolicyRemoveHeadersConfigPtrOutput `pulumi:"removeHeadersConfig"` 174 // A configuration for a set of security-related HTTP response headers. See Security Headers Config for more information. 175 SecurityHeadersConfig ResponseHeadersPolicySecurityHeadersConfigPtrOutput `pulumi:"securityHeadersConfig"` 176 // A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. See Server Timing Headers Config for more information. 177 ServerTimingHeadersConfig ResponseHeadersPolicyServerTimingHeadersConfigPtrOutput `pulumi:"serverTimingHeadersConfig"` 178 } 179 180 // NewResponseHeadersPolicy registers a new resource with the given unique name, arguments, and options. 181 func NewResponseHeadersPolicy(ctx *pulumi.Context, 182 name string, args *ResponseHeadersPolicyArgs, opts ...pulumi.ResourceOption) (*ResponseHeadersPolicy, error) { 183 if args == nil { 184 args = &ResponseHeadersPolicyArgs{} 185 } 186 187 opts = internal.PkgResourceDefaultOpts(opts) 188 var resource ResponseHeadersPolicy 189 err := ctx.RegisterResource("aws:cloudfront/responseHeadersPolicy:ResponseHeadersPolicy", name, args, &resource, opts...) 190 if err != nil { 191 return nil, err 192 } 193 return &resource, nil 194 } 195 196 // GetResponseHeadersPolicy gets an existing ResponseHeadersPolicy resource's state with the given name, ID, and optional 197 // state properties that are used to uniquely qualify the lookup (nil if not required). 198 func GetResponseHeadersPolicy(ctx *pulumi.Context, 199 name string, id pulumi.IDInput, state *ResponseHeadersPolicyState, opts ...pulumi.ResourceOption) (*ResponseHeadersPolicy, error) { 200 var resource ResponseHeadersPolicy 201 err := ctx.ReadResource("aws:cloudfront/responseHeadersPolicy:ResponseHeadersPolicy", name, id, state, &resource, opts...) 202 if err != nil { 203 return nil, err 204 } 205 return &resource, nil 206 } 207 208 // Input properties used for looking up and filtering ResponseHeadersPolicy resources. 209 type responseHeadersPolicyState struct { 210 // A comment to describe the response headers policy. The comment cannot be longer than 128 characters. 211 Comment *string `pulumi:"comment"` 212 // A configuration for a set of HTTP response headers that are used for Cross-Origin Resource Sharing (CORS). See Cors Config for more information. 213 CorsConfig *ResponseHeadersPolicyCorsConfig `pulumi:"corsConfig"` 214 // Object that contains an attribute `items` that contains a list of custom headers. See Custom Header for more information. 215 CustomHeadersConfig *ResponseHeadersPolicyCustomHeadersConfig `pulumi:"customHeadersConfig"` 216 // The current version of the response headers policy. 217 Etag *string `pulumi:"etag"` 218 // A unique name to identify the response headers policy. 219 Name *string `pulumi:"name"` 220 // A configuration for a set of HTTP headers to remove from the HTTP response. Object that contains an attribute `items` that contains a list of headers. See Remove Header for more information. 221 RemoveHeadersConfig *ResponseHeadersPolicyRemoveHeadersConfig `pulumi:"removeHeadersConfig"` 222 // A configuration for a set of security-related HTTP response headers. See Security Headers Config for more information. 223 SecurityHeadersConfig *ResponseHeadersPolicySecurityHeadersConfig `pulumi:"securityHeadersConfig"` 224 // A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. See Server Timing Headers Config for more information. 225 ServerTimingHeadersConfig *ResponseHeadersPolicyServerTimingHeadersConfig `pulumi:"serverTimingHeadersConfig"` 226 } 227 228 type ResponseHeadersPolicyState struct { 229 // A comment to describe the response headers policy. The comment cannot be longer than 128 characters. 230 Comment pulumi.StringPtrInput 231 // A configuration for a set of HTTP response headers that are used for Cross-Origin Resource Sharing (CORS). See Cors Config for more information. 232 CorsConfig ResponseHeadersPolicyCorsConfigPtrInput 233 // Object that contains an attribute `items` that contains a list of custom headers. See Custom Header for more information. 234 CustomHeadersConfig ResponseHeadersPolicyCustomHeadersConfigPtrInput 235 // The current version of the response headers policy. 236 Etag pulumi.StringPtrInput 237 // A unique name to identify the response headers policy. 238 Name pulumi.StringPtrInput 239 // A configuration for a set of HTTP headers to remove from the HTTP response. Object that contains an attribute `items` that contains a list of headers. See Remove Header for more information. 240 RemoveHeadersConfig ResponseHeadersPolicyRemoveHeadersConfigPtrInput 241 // A configuration for a set of security-related HTTP response headers. See Security Headers Config for more information. 242 SecurityHeadersConfig ResponseHeadersPolicySecurityHeadersConfigPtrInput 243 // A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. See Server Timing Headers Config for more information. 244 ServerTimingHeadersConfig ResponseHeadersPolicyServerTimingHeadersConfigPtrInput 245 } 246 247 func (ResponseHeadersPolicyState) ElementType() reflect.Type { 248 return reflect.TypeOf((*responseHeadersPolicyState)(nil)).Elem() 249 } 250 251 type responseHeadersPolicyArgs struct { 252 // A comment to describe the response headers policy. The comment cannot be longer than 128 characters. 253 Comment *string `pulumi:"comment"` 254 // A configuration for a set of HTTP response headers that are used for Cross-Origin Resource Sharing (CORS). See Cors Config for more information. 255 CorsConfig *ResponseHeadersPolicyCorsConfig `pulumi:"corsConfig"` 256 // Object that contains an attribute `items` that contains a list of custom headers. See Custom Header for more information. 257 CustomHeadersConfig *ResponseHeadersPolicyCustomHeadersConfig `pulumi:"customHeadersConfig"` 258 // The current version of the response headers policy. 259 Etag *string `pulumi:"etag"` 260 // A unique name to identify the response headers policy. 261 Name *string `pulumi:"name"` 262 // A configuration for a set of HTTP headers to remove from the HTTP response. Object that contains an attribute `items` that contains a list of headers. See Remove Header for more information. 263 RemoveHeadersConfig *ResponseHeadersPolicyRemoveHeadersConfig `pulumi:"removeHeadersConfig"` 264 // A configuration for a set of security-related HTTP response headers. See Security Headers Config for more information. 265 SecurityHeadersConfig *ResponseHeadersPolicySecurityHeadersConfig `pulumi:"securityHeadersConfig"` 266 // A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. See Server Timing Headers Config for more information. 267 ServerTimingHeadersConfig *ResponseHeadersPolicyServerTimingHeadersConfig `pulumi:"serverTimingHeadersConfig"` 268 } 269 270 // The set of arguments for constructing a ResponseHeadersPolicy resource. 271 type ResponseHeadersPolicyArgs struct { 272 // A comment to describe the response headers policy. The comment cannot be longer than 128 characters. 273 Comment pulumi.StringPtrInput 274 // A configuration for a set of HTTP response headers that are used for Cross-Origin Resource Sharing (CORS). See Cors Config for more information. 275 CorsConfig ResponseHeadersPolicyCorsConfigPtrInput 276 // Object that contains an attribute `items` that contains a list of custom headers. See Custom Header for more information. 277 CustomHeadersConfig ResponseHeadersPolicyCustomHeadersConfigPtrInput 278 // The current version of the response headers policy. 279 Etag pulumi.StringPtrInput 280 // A unique name to identify the response headers policy. 281 Name pulumi.StringPtrInput 282 // A configuration for a set of HTTP headers to remove from the HTTP response. Object that contains an attribute `items` that contains a list of headers. See Remove Header for more information. 283 RemoveHeadersConfig ResponseHeadersPolicyRemoveHeadersConfigPtrInput 284 // A configuration for a set of security-related HTTP response headers. See Security Headers Config for more information. 285 SecurityHeadersConfig ResponseHeadersPolicySecurityHeadersConfigPtrInput 286 // A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. See Server Timing Headers Config for more information. 287 ServerTimingHeadersConfig ResponseHeadersPolicyServerTimingHeadersConfigPtrInput 288 } 289 290 func (ResponseHeadersPolicyArgs) ElementType() reflect.Type { 291 return reflect.TypeOf((*responseHeadersPolicyArgs)(nil)).Elem() 292 } 293 294 type ResponseHeadersPolicyInput interface { 295 pulumi.Input 296 297 ToResponseHeadersPolicyOutput() ResponseHeadersPolicyOutput 298 ToResponseHeadersPolicyOutputWithContext(ctx context.Context) ResponseHeadersPolicyOutput 299 } 300 301 func (*ResponseHeadersPolicy) ElementType() reflect.Type { 302 return reflect.TypeOf((**ResponseHeadersPolicy)(nil)).Elem() 303 } 304 305 func (i *ResponseHeadersPolicy) ToResponseHeadersPolicyOutput() ResponseHeadersPolicyOutput { 306 return i.ToResponseHeadersPolicyOutputWithContext(context.Background()) 307 } 308 309 func (i *ResponseHeadersPolicy) ToResponseHeadersPolicyOutputWithContext(ctx context.Context) ResponseHeadersPolicyOutput { 310 return pulumi.ToOutputWithContext(ctx, i).(ResponseHeadersPolicyOutput) 311 } 312 313 // ResponseHeadersPolicyArrayInput is an input type that accepts ResponseHeadersPolicyArray and ResponseHeadersPolicyArrayOutput values. 314 // You can construct a concrete instance of `ResponseHeadersPolicyArrayInput` via: 315 // 316 // ResponseHeadersPolicyArray{ ResponseHeadersPolicyArgs{...} } 317 type ResponseHeadersPolicyArrayInput interface { 318 pulumi.Input 319 320 ToResponseHeadersPolicyArrayOutput() ResponseHeadersPolicyArrayOutput 321 ToResponseHeadersPolicyArrayOutputWithContext(context.Context) ResponseHeadersPolicyArrayOutput 322 } 323 324 type ResponseHeadersPolicyArray []ResponseHeadersPolicyInput 325 326 func (ResponseHeadersPolicyArray) ElementType() reflect.Type { 327 return reflect.TypeOf((*[]*ResponseHeadersPolicy)(nil)).Elem() 328 } 329 330 func (i ResponseHeadersPolicyArray) ToResponseHeadersPolicyArrayOutput() ResponseHeadersPolicyArrayOutput { 331 return i.ToResponseHeadersPolicyArrayOutputWithContext(context.Background()) 332 } 333 334 func (i ResponseHeadersPolicyArray) ToResponseHeadersPolicyArrayOutputWithContext(ctx context.Context) ResponseHeadersPolicyArrayOutput { 335 return pulumi.ToOutputWithContext(ctx, i).(ResponseHeadersPolicyArrayOutput) 336 } 337 338 // ResponseHeadersPolicyMapInput is an input type that accepts ResponseHeadersPolicyMap and ResponseHeadersPolicyMapOutput values. 339 // You can construct a concrete instance of `ResponseHeadersPolicyMapInput` via: 340 // 341 // ResponseHeadersPolicyMap{ "key": ResponseHeadersPolicyArgs{...} } 342 type ResponseHeadersPolicyMapInput interface { 343 pulumi.Input 344 345 ToResponseHeadersPolicyMapOutput() ResponseHeadersPolicyMapOutput 346 ToResponseHeadersPolicyMapOutputWithContext(context.Context) ResponseHeadersPolicyMapOutput 347 } 348 349 type ResponseHeadersPolicyMap map[string]ResponseHeadersPolicyInput 350 351 func (ResponseHeadersPolicyMap) ElementType() reflect.Type { 352 return reflect.TypeOf((*map[string]*ResponseHeadersPolicy)(nil)).Elem() 353 } 354 355 func (i ResponseHeadersPolicyMap) ToResponseHeadersPolicyMapOutput() ResponseHeadersPolicyMapOutput { 356 return i.ToResponseHeadersPolicyMapOutputWithContext(context.Background()) 357 } 358 359 func (i ResponseHeadersPolicyMap) ToResponseHeadersPolicyMapOutputWithContext(ctx context.Context) ResponseHeadersPolicyMapOutput { 360 return pulumi.ToOutputWithContext(ctx, i).(ResponseHeadersPolicyMapOutput) 361 } 362 363 type ResponseHeadersPolicyOutput struct{ *pulumi.OutputState } 364 365 func (ResponseHeadersPolicyOutput) ElementType() reflect.Type { 366 return reflect.TypeOf((**ResponseHeadersPolicy)(nil)).Elem() 367 } 368 369 func (o ResponseHeadersPolicyOutput) ToResponseHeadersPolicyOutput() ResponseHeadersPolicyOutput { 370 return o 371 } 372 373 func (o ResponseHeadersPolicyOutput) ToResponseHeadersPolicyOutputWithContext(ctx context.Context) ResponseHeadersPolicyOutput { 374 return o 375 } 376 377 // A comment to describe the response headers policy. The comment cannot be longer than 128 characters. 378 func (o ResponseHeadersPolicyOutput) Comment() pulumi.StringPtrOutput { 379 return o.ApplyT(func(v *ResponseHeadersPolicy) pulumi.StringPtrOutput { return v.Comment }).(pulumi.StringPtrOutput) 380 } 381 382 // A configuration for a set of HTTP response headers that are used for Cross-Origin Resource Sharing (CORS). See Cors Config for more information. 383 func (o ResponseHeadersPolicyOutput) CorsConfig() ResponseHeadersPolicyCorsConfigPtrOutput { 384 return o.ApplyT(func(v *ResponseHeadersPolicy) ResponseHeadersPolicyCorsConfigPtrOutput { return v.CorsConfig }).(ResponseHeadersPolicyCorsConfigPtrOutput) 385 } 386 387 // Object that contains an attribute `items` that contains a list of custom headers. See Custom Header for more information. 388 func (o ResponseHeadersPolicyOutput) CustomHeadersConfig() ResponseHeadersPolicyCustomHeadersConfigPtrOutput { 389 return o.ApplyT(func(v *ResponseHeadersPolicy) ResponseHeadersPolicyCustomHeadersConfigPtrOutput { 390 return v.CustomHeadersConfig 391 }).(ResponseHeadersPolicyCustomHeadersConfigPtrOutput) 392 } 393 394 // The current version of the response headers policy. 395 func (o ResponseHeadersPolicyOutput) Etag() pulumi.StringOutput { 396 return o.ApplyT(func(v *ResponseHeadersPolicy) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) 397 } 398 399 // A unique name to identify the response headers policy. 400 func (o ResponseHeadersPolicyOutput) Name() pulumi.StringOutput { 401 return o.ApplyT(func(v *ResponseHeadersPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 402 } 403 404 // A configuration for a set of HTTP headers to remove from the HTTP response. Object that contains an attribute `items` that contains a list of headers. See Remove Header for more information. 405 func (o ResponseHeadersPolicyOutput) RemoveHeadersConfig() ResponseHeadersPolicyRemoveHeadersConfigPtrOutput { 406 return o.ApplyT(func(v *ResponseHeadersPolicy) ResponseHeadersPolicyRemoveHeadersConfigPtrOutput { 407 return v.RemoveHeadersConfig 408 }).(ResponseHeadersPolicyRemoveHeadersConfigPtrOutput) 409 } 410 411 // A configuration for a set of security-related HTTP response headers. See Security Headers Config for more information. 412 func (o ResponseHeadersPolicyOutput) SecurityHeadersConfig() ResponseHeadersPolicySecurityHeadersConfigPtrOutput { 413 return o.ApplyT(func(v *ResponseHeadersPolicy) ResponseHeadersPolicySecurityHeadersConfigPtrOutput { 414 return v.SecurityHeadersConfig 415 }).(ResponseHeadersPolicySecurityHeadersConfigPtrOutput) 416 } 417 418 // A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. See Server Timing Headers Config for more information. 419 func (o ResponseHeadersPolicyOutput) ServerTimingHeadersConfig() ResponseHeadersPolicyServerTimingHeadersConfigPtrOutput { 420 return o.ApplyT(func(v *ResponseHeadersPolicy) ResponseHeadersPolicyServerTimingHeadersConfigPtrOutput { 421 return v.ServerTimingHeadersConfig 422 }).(ResponseHeadersPolicyServerTimingHeadersConfigPtrOutput) 423 } 424 425 type ResponseHeadersPolicyArrayOutput struct{ *pulumi.OutputState } 426 427 func (ResponseHeadersPolicyArrayOutput) ElementType() reflect.Type { 428 return reflect.TypeOf((*[]*ResponseHeadersPolicy)(nil)).Elem() 429 } 430 431 func (o ResponseHeadersPolicyArrayOutput) ToResponseHeadersPolicyArrayOutput() ResponseHeadersPolicyArrayOutput { 432 return o 433 } 434 435 func (o ResponseHeadersPolicyArrayOutput) ToResponseHeadersPolicyArrayOutputWithContext(ctx context.Context) ResponseHeadersPolicyArrayOutput { 436 return o 437 } 438 439 func (o ResponseHeadersPolicyArrayOutput) Index(i pulumi.IntInput) ResponseHeadersPolicyOutput { 440 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResponseHeadersPolicy { 441 return vs[0].([]*ResponseHeadersPolicy)[vs[1].(int)] 442 }).(ResponseHeadersPolicyOutput) 443 } 444 445 type ResponseHeadersPolicyMapOutput struct{ *pulumi.OutputState } 446 447 func (ResponseHeadersPolicyMapOutput) ElementType() reflect.Type { 448 return reflect.TypeOf((*map[string]*ResponseHeadersPolicy)(nil)).Elem() 449 } 450 451 func (o ResponseHeadersPolicyMapOutput) ToResponseHeadersPolicyMapOutput() ResponseHeadersPolicyMapOutput { 452 return o 453 } 454 455 func (o ResponseHeadersPolicyMapOutput) ToResponseHeadersPolicyMapOutputWithContext(ctx context.Context) ResponseHeadersPolicyMapOutput { 456 return o 457 } 458 459 func (o ResponseHeadersPolicyMapOutput) MapIndex(k pulumi.StringInput) ResponseHeadersPolicyOutput { 460 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResponseHeadersPolicy { 461 return vs[0].(map[string]*ResponseHeadersPolicy)[vs[1].(string)] 462 }).(ResponseHeadersPolicyOutput) 463 } 464 465 func init() { 466 pulumi.RegisterInputType(reflect.TypeOf((*ResponseHeadersPolicyInput)(nil)).Elem(), &ResponseHeadersPolicy{}) 467 pulumi.RegisterInputType(reflect.TypeOf((*ResponseHeadersPolicyArrayInput)(nil)).Elem(), ResponseHeadersPolicyArray{}) 468 pulumi.RegisterInputType(reflect.TypeOf((*ResponseHeadersPolicyMapInput)(nil)).Elem(), ResponseHeadersPolicyMap{}) 469 pulumi.RegisterOutputType(ResponseHeadersPolicyOutput{}) 470 pulumi.RegisterOutputType(ResponseHeadersPolicyArrayOutput{}) 471 pulumi.RegisterOutputType(ResponseHeadersPolicyMapOutput{}) 472 }