-
Notifications
You must be signed in to change notification settings - Fork 150
/
getOriginRequestPolicy.go
66 lines (61 loc) · 2.81 KB
/
getOriginRequestPolicy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package cloudfront
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// The following example below creates a CloudFront origin request policy.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cloudfront"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "example-policy"
// _, err := cloudfront.LookupOriginRequestPolicy(ctx, &cloudfront.LookupOriginRequestPolicyArgs{
// Name: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupOriginRequestPolicy(ctx *pulumi.Context, args *LookupOriginRequestPolicyArgs, opts ...pulumi.InvokeOption) (*LookupOriginRequestPolicyResult, error) {
var rv LookupOriginRequestPolicyResult
err := ctx.Invoke("aws:cloudfront/getOriginRequestPolicy:getOriginRequestPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getOriginRequestPolicy.
type LookupOriginRequestPolicyArgs struct {
// The identifier for the origin request policy.
Id *string `pulumi:"id"`
// Unique name to identify the origin request policy.
Name *string `pulumi:"name"`
}
// A collection of values returned by getOriginRequestPolicy.
type LookupOriginRequestPolicyResult struct {
// Comment to describe the origin request policy.
Comment string `pulumi:"comment"`
// Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
CookiesConfigs []GetOriginRequestPolicyCookiesConfig `pulumi:"cookiesConfigs"`
// The current version of the origin request policy.
Etag string `pulumi:"etag"`
// Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
HeadersConfigs []GetOriginRequestPolicyHeadersConfig `pulumi:"headersConfigs"`
Id *string `pulumi:"id"`
Name *string `pulumi:"name"`
// Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query Strings Config for more information.
QueryStringsConfigs []GetOriginRequestPolicyQueryStringsConfig `pulumi:"queryStringsConfigs"`
}