Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.25.0 published on Friday, Oct 15, 2021 by Pulumi

getOriginRequestPolicy

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.CloudFront.GetOriginRequestPolicy.InvokeAsync(new Aws.CloudFront.GetOriginRequestPolicyArgs
        {
            Name = "example-policy",
        }));
    }

}
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
	})
}
import pulumi
import pulumi_aws as aws

example = aws.cloudfront.get_origin_request_policy(name="example-policy")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.cloudfront.getOriginRequestPolicy({
    name: "example-policy",
}));

Using getOriginRequestPolicy

function getOriginRequestPolicy(args: GetOriginRequestPolicyArgs, opts?: InvokeOptions): Promise<GetOriginRequestPolicyResult>
def get_origin_request_policy(id: Optional[str] = None,
                              name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetOriginRequestPolicyResult
func LookupOriginRequestPolicy(ctx *Context, args *LookupOriginRequestPolicyArgs, opts ...InvokeOption) (*LookupOriginRequestPolicyResult, error)

Note: This function is named LookupOriginRequestPolicy in the Go SDK.

public static class GetOriginRequestPolicy {
    public static Task<GetOriginRequestPolicyResult> InvokeAsync(GetOriginRequestPolicyArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id string
The identifier for the origin request policy.
Name string
Unique name to identify the origin request policy.
Id string
The identifier for the origin request policy.
Name string
Unique name to identify the origin request policy.
id string
The identifier for the origin request policy.
name string
Unique name to identify the origin request policy.
id str
The identifier for the origin request policy.
name str
Unique name to identify the origin request policy.

getOriginRequestPolicy Result

The following output properties are available:

Comment string
Comment to describe the origin request policy.
CookiesConfigs List<GetOriginRequestPolicyCookiesConfig>
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.
Etag string
The current version of the origin request policy.
HeadersConfigs List<GetOriginRequestPolicyHeadersConfig>
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.
QueryStringsConfigs List<GetOriginRequestPolicyQueryStringsConfig>
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.
Id string
Name string
Comment string
Comment to describe the origin request policy.
CookiesConfigs []GetOriginRequestPolicyCookiesConfig
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.
Etag string
The current version of the origin request policy.
HeadersConfigs []GetOriginRequestPolicyHeadersConfig
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.
QueryStringsConfigs []GetOriginRequestPolicyQueryStringsConfig
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.
Id string
Name string
comment string
Comment to describe the origin request policy.
cookiesConfigs GetOriginRequestPolicyCookiesConfig[]
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.
etag string
The current version of the origin request policy.
headersConfigs GetOriginRequestPolicyHeadersConfig[]
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.
queryStringsConfigs GetOriginRequestPolicyQueryStringsConfig[]
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.
id string
name string
comment str
Comment to describe the origin request policy.
cookies_configs Sequence[GetOriginRequestPolicyCookiesConfig]
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.
etag str
The current version of the origin request policy.
headers_configs Sequence[GetOriginRequestPolicyHeadersConfig]
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.
query_strings_configs Sequence[GetOriginRequestPolicyQueryStringsConfig]
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.
id str
name str

Supporting Types

GetOriginRequestPolicyCookiesConfig

GetOriginRequestPolicyCookiesConfigCookie

Items List<string>
Items []string
items string[]
items Sequence[str]

GetOriginRequestPolicyHeadersConfig

GetOriginRequestPolicyHeadersConfigHeader

Items List<string>
Items []string
items string[]
items Sequence[str]

GetOriginRequestPolicyQueryStringsConfig

GetOriginRequestPolicyQueryStringsConfigQueryString

Items List<string>
Items []string
items string[]
items Sequence[str]

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.